package org.hoyi.dispatchfact;

import java.util.ArrayList;
import java.util.List;

public class DispatcherFactory {

	private static List<IDispatcher> _instance;
	
	static{
		if (_instance == null) {
			_instance = new ArrayList<>();
			AddDispatch(new CustomFileDispatcher());
			AddDispatch(new HoyiPageDispatcher());
		}
	}
	
	public static List<IDispatcher> getList(){
		return _instance;
	}
	
	public static void AddDispatch(IDispatcher _dispatcher){
		getList().add(_dispatcher);
	}
	
}
